package com.warehouse_management.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.warehouse_management.purchase.model.Firm;
import com.warehouse_management.purchase.model.FirmCondition;
import com.warehouse_management.system.model.City;
import com.warehouse_management.system.model.Province;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @PACKAGE_NAME: com.warehouse_management.purchase.dao
 * @NAME: ManufacturerDao
 * @USER: ZhouYongCheng
 * @DATE: 2022/10/3
 * @TIME: 3:00
 * @Description: 厂商管理Dao层
 */
@Mapper
public interface ManufacturerDao extends BaseMapper<FirmCondition> {

    /**
     * 连小龙
     * 查询所有数据
     * @return
     */
    public List<FirmCondition> queryFirmList();

    /**
     * 连小龙
     * 查询单个厂商详情
     * @return
     */
    public FirmCondition queryOneFirm(FirmCondition fc);


    /**
     * 连小龙
     * 通过条件模糊查询
     * @return
     */
    public List<FirmCondition> queryFirmListByCondition(FirmCondition fc);


    /**
     * 连小龙
     * 添加厂商
     * @return
     */
    public int addFirm(FirmCondition firm);

    /**
     * 连小龙
     * 修改厂商状态
     * @return
     */
    public int updateFirm(FirmCondition fc);

    /**
     * 连小龙
     * 查询所有省份
     * @return
     */
    List<Province> queryProvince();

    /**
     * 连小龙
     * 查询所有城市
     * @return
     */
    List<City> queryCity(String id);
}
